package com.cashmama.market.api.application.controller.home.request;

import com.cashmama.market.api.infras.exception.ApplicationException;
import com.cashmama.market.api.infras.utils.StringUtils;
import com.fqgj.common.api.ParamsObject;

/**
 * @program: market-api
 * @description
 * @author: frank
 * @create: 2020-01-07 09:49
 **/
public class ProductDetailRequest extends ParamsObject {

    private String merchantCode;

    public String getMerchantCode() {
        return merchantCode;
    }

    public ProductDetailRequest setMerchantCode(String merchantCode) {
        this.merchantCode = merchantCode;
        return this;
    }

    @Override
    public void validate() {
        if(StringUtils.isEmpty(merchantCode)){
            throw new ApplicationException("merchantCode can not be empty");
        }
    }
}
